/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout';

// 路由模块化：商品管理中心路由
const StoreRouters = [
    {
        // 用来分享，供外部系统iframe内嵌使用，脱离框架布局
        hidden: true,
        path: '/store/shared/:id',
        component: () => import('@/views/store-management/store-detail/index'),
        meta: {
            title: '商品详情',
            isNotCheckToken: true
        }
    },
    {
        hidden: true,
        path: '/store',
        component: Layout,
        redirect: '/list',
        meta: {
            title: '商品管理'
        },
        children: [
            {
                path: 'list',
                name: 'StoreList',
                component: () => import('@/views/store-management/store-list/list'),
                meta: {
                    title: '商品列表'
                }
            },
            {
                path: 'add',
                name: 'StoreAdd',
                component: () => import('@/views/store-management/store-list/add'),
                meta: {
                    title: '新增商品',
                    activeMenu: '/store/list',
                    isNotCheckToken: true
                }
            },
            {
                path: 'edit/:id',
                name: 'StoreEdit',
                component: () => import('@/views/store-management/store-list/add'),
                meta: {
                    title: '修改商品',
                    activeMenu: '/store/list',
                    isNotCheckToken: true
                }
            },
            {
                path: 'detail/:id',
                name: 'StoreDetail',
                component: () => import('@/views/store-management/store-list/detail'),
                meta: {
                    title: '商品详情',
                    activeMenu: '/store/list',
                    isNotCheckToken: true
                }
            },
            {
                path: 'skuList',
                name: 'StoreSkuList',
                component: () => import('@/views/store-management/store-skuList/list'),
                meta: {
                    title: '商品SKU列表'
                }
            },
            {
                path: 'tag',
                name: 'StoreTag',
                component: () => import('@/views/store-management/store-tag/index'),
                meta: {
                    title: '商品标签'
                }
            },
            {
                path: 'attribute',
                name: 'StoreAttribute',
                component: () => import('@/views/store-management/store-attribute/list'),
                meta: {
                    title: '商品属性'
                }
            },
            {
                path: 'attribute/add',
                name: 'StoreAttributeAdd',
                component: () => import('@/views/store-management/store-attribute/add'),
                meta: {
                    title: '新增商品属性',
                    activeMenu: '/store/attribute',
                    isNotCheckToken: true
                }
            },
            {
                path: 'attribute/edit',
                name: 'StoreAttributeEdit',
                component: () => import('@/views/store-management/store-attribute/add'),
                meta: {
                    title: '编辑商品属性',
                    activeMenu: '/store/attribute',
                    isNotCheckToken: true
                }
            },
            {
                path: 'class',
                name: 'StoreClass',
                component: () => import('@/views/store-management/store-class/index'),
                meta: {
                    title: '商品分类'
                }
            },
            {
                path: 'brand',
                name: 'StoreBrand',
                component: () => import('@/views/store-management/store-brand/index'),
                meta: {
                    title: '商品品牌'
                }
            },
            {
                path: 'brand/add',
                name: 'StoreBrandAdd',
                component: () => import('@/views/store-management/store-brand/add'),
                meta: {
                    title: '新建商品品牌',
                    activeMenu: '/store/brand',
                    isNotCheckToken: true
                }
            },
            {
                path: 'brand/edit',
                name: 'StoreBrandEdit',
                component: () => import('@/views/store-management/store-brand/add'),
                meta: {
                    title: '编辑商品品牌',
                    activeMenu: '/store/brand',
                    isNotCheckToken: true
                }
            },
            {
                path: 'supply',
                name: 'StoreSupply',
                component: () => import('@/views/store-management/store-supply/index'),
                meta: {
                    title: '商品供应商'
                }
            },
            {
                path: 'express',
                name: 'StoreExpress',
                component: () => import('@/views/store-management/store-express/index'),
                meta: {
                    title: '运费模板'
                }
            },
            {
                path: 'channel',
                name: 'StoreChannel',
                component: () => import('@/views/store-management/store-channel/index'),
                meta: {
                    title: '渠道管理'
                }
            },
            {
                path: 'size',
                name: 'StoreSize',
                component: () => import('@/views/store-management/store-size/list'),
                meta: {
                    title: '尺码管理'
                }
            },
        ]
    },
    {
        hidden: true,
        path: '/price',
        redirect: '/list',
        name: 'StorePrice',
        component: Layout,
        meta: {
            title: '价格管理'
        },
        children: [
            {
                path: 'list',
                name: 'StorePriceList',
                component: () => import('@/views/store-management/store-price/index'),
                meta: {
                    title: '价格模板'
                }
            },
            {
                path: 'type',
                name: 'StorePriceType',
                component: () => import('@/views/store-management/store-price/type'),
                meta: {
                    title: '价格类型'
                }
            }
        ]
    }
];

export default StoreRouters;
